package com.lzy.wzy.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Validated
public class ModifyWorkOrderBean {

    @NotBlank
    private String workOrderNumber; //工单号

    @NotBlank
    private String orderNumber; //订单号

    @NotBlank
    private String productCode;  //产品编码

    @NotBlank
    private String productNumber; //产品型号

    @NotBlank
    private String productionQuantity; //生产数量

    @NotNull
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
    private LocalDate planBeginTime; //计划开始时间

    @NotNull
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
    private LocalDate planEndTime; //计划结束时间

    @NotBlank
    private String softwareVersion;

    @NotBlank
    private String remarks; //备注
}
